import Vue from 'vue'
import App from './App.vue'
import routers from "@/routers";
import TypeNav from "@/components/TypeNav";
import Swiper from "@/components/Swiper";
import Pagination from "@/components/Pagination";
import store from "@/store";
import '@/mock'  // 使用mock 假数据

// element-ui 的使用
import '@/main/elementUi'

// 图片的懒加载
import '@/main/loadimage'

// 表单的校验
import '@/main/veeValidate'


Vue.config.productionTip = false

// 注册全局组件
Vue.component('TypeNav', TypeNav)
Vue.component('Swiper', Swiper)
Vue.component('Pagination', Pagination)

new Vue({
	render: h => h(App),
	// 路由注入
	router: routers,
	// 仓库注入
	store: store,
	// 任意组件通信
	beforeCreate() {
		Vue.prototype.$bus = this
	}
}).$mount('#app')
